import { Component } from '@angular/core';
import { ActionSheetController} from "ionic-angular";

@Component({
  selector: 'actionsheet',
  templateUrl: 'actionsheet.html'
})
export class ActionsheetComponent {

    text: string;
    constructor(public actionSheetCtrl: ActionSheetController) {

    }
    presentActionSheet() {
        let actionSheet = this.actionSheetCtrl.create({
            title: '操作',
            buttons: [
                {
                    text: '处理1',
                    role: 'click1',
                    handler: () => {
                        console.log('Destructive clicked');
                    }
                },
                {
                    text: '处理1',
                    role: 'click2',
                    handler: () => {
                        console.log('Archive clicked');
                    }
                },
                {
                    text: '取消',
                    role: 'cancel',
                    handler: () => {
                        console.log('Cancel clicked');
                    }
                }
            ]
        });

        actionSheet.present();
    }


}
